package com.hspjava.String_;

public class StringExercise05 {
    public static void main(String[] args) {
        Person p1 = new Person();
        p1.name = "lfm114514";
        Person p2 = new Person();
        p2.name = "lfm114514";

        System.out.println(p1.name.equals(p2.name));//true
        System.out.println(p1.name == p2.name);//true
        System.out.println(p1.name == "lfm114514");//true

        String s1 = new String("bcde");
        String s2 = new String("bcde");

        System.out.println(s1 == s2);//false


    }

}


class Person {
    String name;
}
